# 直角三角形
s = "*"
for i in range(1,6):
    print("{0:<{1}}".format(s*i,i))

print()
# 等腰三角形
for i in range(1,6):
    space = (9 - (2*i-1))//2
    print(space*" "+s*(2*i - 1))
print()
# 正方形
print(s*5)
for i in range(3):
    print("*"+" "*30+"*")
print(s*5)
print()
# 菱形
for i in range(1,6):
    print("{0:^{1}}".format(s*(2*i - 1),9))
for i in range(3,0,-1):
    print("{0:^{1}}".format(s * (2 * i - 1), 9))
print()
# 箭头
for i in range(1,6):
    print("{0:^{1}}".format(s * (2 * i - 1), 9))
for i in range(4):
    print("{0:^{1}}".format(s * 2,9))
print()
# 心形
counts = [3,4,5,4,3]
for i in counts:
    spaces = (5 - i)
    print(" "*spaces + s * i + " "*3 + s * i)
print(" " * 6 + "*")
